package com.example.hxds.bff.customer.service.impl;

import cn.hutool.core.map.MapUtil;
import com.codingapi.txlcn.tc.annotation.LcnTransaction;
import com.example.hxds.bff.customer.controller.form.UpdateOrderAboutPaymentForm;
import com.example.hxds.bff.customer.feign.OdrServiceApi;
import com.example.hxds.bff.customer.service.PayService;
import com.example.hxds.common.util.R;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

/**
 * @Author XUYANG
 * @Date 2024-04-09 19:58
 */
@Service
@Slf4j
public class PayServiceImpl implements PayService {
    @Resource
    private OdrServiceApi orderServiceApi;
    @Override
    @Transactional
    @LcnTransaction
    public String updateOrderAboutPayment(UpdateOrderAboutPaymentForm form) {
        R r=orderServiceApi.updateOrderAboutPayment(form);
        String res= MapUtil.getStr(r,"result");
        return res;
    }
}
